const tb1 = [
  {
    headerName: '公司',
    field: 'outSouringCompany',
    width: 150,
  },
  {
    headerName: '客户',
    field: 'customName',
    width: 150,
  },
  {
    headerName: '生产单号',
    field: 'weavingCode',
    width: 150,
  },
  {
    headerName: '织布单号',
    field: 'planOrderCode',
    width: 150,
  },
  {
    headerName: '开单时间',
    field: 'planDate',
    width: 150,
  },
  {
    headerName: '机台号',
    field: 'machineCode',
    width: 150,
  },
  {
    headerName: '坯布编号',
    field: 'greyCode',
    width: 150,
  },
  {
    headerName: '坯布名称',
    field: 'greyName',
    width: 150,
  },
  {
    headerName: '坯布批号',
    field: 'greyBatchNo',
    width: 150,
  },
  {
    headerName: '状态',
    field: 'productionState',
    width: 150,
    cellRenderer: {
      template: `
      <span>{{ computedState }}</span>
      `,
      setup(props: any) {
        return {
          computedState: props.params.data.productionState == 0
            ? '等待'
            : props.params.data.productionState == 1
              ? '生产中'
              : props.params.data.productionState == 2
                ? '完成'
                : '暂停',
        }
      }
    },
    filterParams: {
      valueFormatter: function (params: any) {
        return params.value == '0'
          ? '等待'
          : params.value == '1'
            ? '生产中'
            : params.value == '2'
              ? '完成'
              : '暂停'
      },
    },
  },
]

export { tb1 }